<?php
////////////////////////////////////////////////////////////////////////////////
//
//  WEBMASTERCLUB.COM.BR
//  Copyright (c) 2009-2014 Israel Agoeiro 
//  All Rights Reserved. 
//  Todos os direitos reservados. 
//
//  NOTICE: Israel Agoeiro permits you to use, modify, and distribute this file
//  in accordance with the terms of the license agreement accompanying it.
//
//  AVISO: Israel Agoeiro lhe permite utilizar, modificar e distribuir este 
//  arquivo de acordo com os termos da licenca que o acompanha.
//
//  copyright	Copyright (c) 2009-2014 Israel Agoeiro (http://www.agoeiro.com)
//  license		http://www.agoeiro.com/license 
//
////////////////////////////////////////////////////////////////////////////////

//----------------------------------
//  example
//----------------------------------
/**

Config:

	$this->useMatrix("id-1")
		 ->value("x"); //middle|left|right|top|bottom
		 
render:
	echo $this->useMatrix('matrixId');
		 
 */	

//------------------------------------------------------------------------------
//
//  Class
//
//------------------------------------------------------------------------------
class Zend_View_Helper_UseContentMenu extends UseZF_Helper_Abstract
{
	//--------------------------------------------------------------------------
    //
    //  Constructor
    //
    //--------------------------------------------------------------------------
    
	//----------------------------------
    //  useMatrix
    //----------------------------------	
	/**
	 * Inicia uma nova instancia do plugin
	 * 
     * @param id Recebe um identificador
	 * @return UseExtra_useMatrix
	 */	
    public function useContentMenu($id)
    {
		  $this->init();

      //Configura scripts necessários
    	//$this->view->headScript()->offsetSetFile(0, $this->view->useDefault->opensource .'/usejs/useMatrix.js', 'text/javascript');
  		
  		$this->_id = $id;
      
  		if(!$this->isRegistered('matrix', $this->_id))
  		{
  			//Cria objeto de configuracao
  			$helperConfig = (object)null;
  
  
  			$helperConfig->params = (object)null;
  			$helperConfig->params->id = $this->_id;
  			$helperConfig->params->name = $this->_id;
  			
  			$this->helperRegistry('matrix', $this->_id, $helperConfig);
  		}
  		return $this;
    }


	/**
	 * Nome do objeto swf
	 * 
     * @return UseExtra_useMatrix
	 * 
	 * @param String $value 
	 */
	public function name($value){
		$this->useHelper()->params->name = $value; 
		return $this;	
	}

	
	 public function __toString() {
	  return '<div class="use-content-menu">
			    	<ul>
			    		<li class="use-content-menu-first">NEWS</li>
			    		<li>AGENDA</li>
			    		<li>O CLUB</li>
			    		<li>RESTAURANTE</li>
			    		<li>CHAMPANHERIA</li>
			    		<li>SU&Iacute;TES</li>
			    		<li>GALERIA</li>
			    		<li>EVENTOS</li>
			    		<li class="use-content-menu-last">CONTATO</li>
			    	</ul>
			    </div>';
    }

}